import request from "@/utils/request";

// 用户登录
export function login(data) {
  return request({
    url: "/login/login",
    method: "post",
    data,
  });
}

// 用户注册
export function register(data) {
  return request({
    url: "/login/register", 
    method: "post",
    data,
  });
}

// 获取所有用户
export function getAllUsers() {
  return request({
    url: "/login/list",
    method: "get",
  });
}

// 根据用户名和/或密码搜索用户
export function searchUsers(params) {
  return request({
    url: "/login/search",
    method: "get",
    params,
  });
}
